//
//  CAnimalProperty.m
//  MacConsole
//
//  Created by MacVM on 2024/1/1.
//

#import "CAnimalProperty.h"

@implementation CAnimalProperty

- (void)setAll:(int)age firstName:(nonnull NSString *)firstName lastName:(nonnull NSString *)lastName {
    _age = age;
    _firstName = firstName;
    _lastName = lastName;
}

- (void)setFullName:(nonnull NSString *)firstName lastName:(nonnull NSString *)lastName {
    _firstName = firstName;
    _lastName = lastName;
}

- (void)setName:(nonnull NSString *)name {
    _firstName = name;
}

//- (nonnull NSString *)ToString {
- (NSString *)description {
    return [NSString stringWithFormat:@"name:%@, age:%d", [self getFullName], _age];
}

- (nonnull NSString *)getFullName {
    return [NSString stringWithFormat:@"%@.%@", _firstName, _lastName];
}

- (void)Shout {
    NSLog(@"shout from base");
}

@end
